//Reflect 是一个内置的对象     Object

import { isObject } from "../share/util";
import { mutableHandler } from "./mutableHandle";
function reactive(target) {
  return createReactiveObject(target, mutableHandler);
}

function createReactiveObject(target, baseHandler) {
  if (!isObject(target)) {
    return target;
  }
  const observer = new Proxy(target, baseHandler);
  return observer;
}

export { reactive };
